project( zebra )

add_subdirectory( src )

set(ZEBRA_VERSION_MAJOR "0")
set(ZEBRA_VERSION_MINOR "4")
set(PACKAGE "zebra")

### do some checks

include( CheckFunctionExists )
include( CheckIncludeFiles )
include( CheckLibraryExists )
include( CheckTypeSize )


#/* Define to 1 if you have the `atexit' function. */
check_function_exists( atexit HAVE_ATEXIT )

#/* Define to 1 if you have the <dlfcn.h> header file. */
check_include_files( dlfcn.h HAVE_DLFCN_H )

#/* Define to 1 if you have the <fcntl.h> header file. */
check_include_files( fcntl.h HAVE_FCNTL_H )

#/* Define to 1 if you have the `getpagesize' function. */
check_function_exists( getpagesize HAVE_GETPAGESIZE )

#/* Define to 1 if you have the <inttypes.h> header file. */
check_include_files( inttypes.h HAVE_INTTYPES_H )

#/* Define to 1 if you have the `pthread' library (-lpthread). */
check_library_exists(pthread pthread_self "" HAVE_LIBPTHREAD)

#/* Define to 1 if you have the <linux/videodev2.h> header file. */
check_include_files( linux/videodev2.h HAVE_LINUX_VIDEODEV2_H )

#/* Define to 1 if you have the <linux/videodev.h> header file. */
check_include_files( linux/videodev.h HAVE_LINUX_VIDEODEV_H )

#/* Define to 1 if you have the <memory.h> header file. */
check_include_files( memory.h HAVE_MEMORY_H )

#/* Define to 1 if you have the `memset' function. */
check_function_exists( memset HAVE_MEMSET )

#/* Define to 1 if you have a working `mmap' system call. */
check_function_exists( mmap HAVE_MMAP )

#/* Define to 1 if you have the <pthread.h> header file. */
check_include_files( pthread.h HAVE_PTHREAD_H )

#/* Define to 1 if you have the `setenv' function. */
check_function_exists( setenv HAVE_SETENV )

#/* Define to 1 if you have the <stdint.h> header file. */
check_include_files( stdint.h HAVE_STDINT_H )

#/* Define to 1 if you have the <stdlib.h> header file. */
check_include_files( stdlib HAVE_STDLIB_H )

#/* Define to 1 if you have the <strings.h> header file. */
check_include_files( strings.h HAVE_STRINGS_H )

#/* Define to 1 if you have the <string.h> header file. */
check_include_files( string.h HAVE_STRING_H )

#/* Define to 1 if you have the <sys/ioctl.h> header file. */
check_include_files( sys/ioctl.h HAVE_SYS_IOCTL_H )

#/* Define to 1 if you have the <sys/ipc.h> header file. */
check_include_files( sys/ipc.h HAVE_SYS_IPC_H )

#/* Define to 1 if you have the <sys/mman.h> header file. */
check_include_files( sys/mman.h HAVE_SYS_MMAN_H )

#/* Define to 1 if you have the <sys/shm.h> header file. */
check_include_files( sys/shm.h HAVE_SYS_SHM_H )

#/* Define to 1 if you have the <sys/stat.h> header file. */
check_include_files( sys/stat.h HAVE_SYS_STAT_H )

#/* Define to 1 if you have the <sys/times.h> header file. */
check_include_files( sys/times.h HAVE_SYS_TIMES_H )

#/* Define to 1 if you have the <sys/time.h> header file. */
check_include_files( sys/time.h HAVE_SYS_TIME_H )

#/* Define to 1 if you have the <sys/types.h> header file. */
check_include_files( sys/types.h HAVE_SYS_TYPES_H )

#/* Define to 1 if the system has the type `uintptr_t'. */
check_type_size( uintptr_t UINTPTR_T ) 
#automatically creates HAVE_UINTPTR_T, size is in UINTPTR_T

#/* Define to 1 if you have the <unistd.h> header file. */
check_include_files( unistd.h HAVE_UNISTD_H )

#/* Define to 1 if you have the <X11/extensions/XShm.h> header file. */
check_include_files( X11/extensions/XShm.h HAVE_X11_EXTENSIONS_XSHM_H )

#/* Define to 1 if you have the <X11/extensions/Xvlib.h> header file. */
check_include_files( X11/extensions/Xvlib.h HAVE_X11_EXTENSIONS_XVLIB_H )

#/* Define to 1 if assertions should be disabled. */
#undef NDEBUG

#/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O

#/* Name of package */
#undef PACKAGE

#/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT

#/* Define to the full name of this package. */
#undef PACKAGE_NAME

#/* Define to the full name and version of this package. */
#undef PACKAGE_STRING

#/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME

#/* Define to the version of this package. */
#undef PACKAGE_VERSION

#/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS

#/* Version number of package */
#undef VERSION

#/* Define to 1 if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING
set(X_DISPLAY_MISSING "0")

#/* Program major version (before the '.') as a number */
#undef ZEBRA_VERSION_MAJOR

#/* Program minor version (after '.') as a number */
#undef ZEBRA_VERSION_MINOR

#/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
#   <pthread.h>, or <semaphore.h> is not used. If the typedef was allowed, the
#   #define below would cause a syntax error. */
#undef _UINT32_T

#/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
#   <pthread.h>, or <semaphore.h> is not used. If the typedef was allowed, the
#   #define below would cause a syntax error. */
#undef _UINT8_T

#/* Define to empty if `const' does not conform to ANSI C. */
#undef const

#/* Define to `__inline__' or `__inline' if that's what the C compiler
#   calls it, or to nothing if 'inline' is not supported under any name.  */
#ifndef __cplusplus
#undef inline
#endif

#/* Define to the type of a signed integer type of width exactly 32 bits if
#   such a type exists and the standard includes do not define it. */
#undef int32_t

#/* Define to the type of an unsigned integer type of width exactly 32 bits if
#   such a type exists and the standard includes do not define it. */
#undef uint32_t

#/* Define to the type of an unsigned integer type of width exactly 8 bits if
#   such a type exists and the standard includes do not define it. */
#undef uint8_t

#/* Define to the type of an unsigned integer type wide enough to hold a
#   pointer, if such a type exists, and if the system does not define it. */
#undef uintptr_t

#ifndef X_DISPLAY_MISSING
# define HAVE_X
#endif


configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
